package com.xxl.job.executor.sample.frameless.test.strategy_mode;

//环境类
public class Context {

    private Strategy strategy;

    public Context() {
    }

    //构造函数，传入不同实现类
    public Context(Strategy strategy) {
        this.strategy = strategy;
    }

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    public String operate() {
        return this.strategy.operate();
    }
}
